import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

public class readListener extends AnalysisEventListener<ExcelRead> {

    //一行一行读取，但是不读取表头
    @Override
    public void invoke(ExcelRead data, AnalysisContext analysisContext) {
        System.out.println(data.toString());
    }

    //读取完成之后做的事情
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    //读取表头
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println(headMap);
    }
}